Is it possible to summarize conditional named dynamic imports iteratively in JavaScript